import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
import page from '../components/page'

import chatRoom from '../components/chat'

import talk from '../components/talk'
import friends from '../components/friends'
import group from '../components/group'

export default new Router({
    mode: "history",
    // base: process.env.BASE_URL,
    routes: [
      {
        path: "/",
        name: "index",
        hidden: false,
        component: page,
        children: [
          {
            path: "chatRoom",
            name: "chatRoom",
            component: chatRoom,
            children: [
              {
                path: "talk",
                component: talk,
                name: "talk"
              },
              {
                path: "friends",
                component: friends,
                name: "friends"
              },
              {
                path: "group",
                component: group,
                name: "group"
              },
            ]
          }
        ]
      }
    ]
  })